﻿package javase.socket.server;
import java.io.*;
import java.net.*;

public class UDPServer {
	public static void main(String[] args) {
		String str="hello";
		byte[] b = str.getBytes();
		DatagramPacket dp;
		
		try {
			DatagramSocket ds = new DatagramSocket(6666);
			dp = new DatagramPacket(b,b.length ,InetAddress.getLocalHost(), 7777);
			ds.send(dp);
			
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
